- if @content_assets.empty?
  br

  .alert.alert-warning
    == t('.no_items')

- else
  - # Display the assets
  .content-assets-list
    - @content_assets.each do |asset|
      .asset
        .top
          h2= asset_filename(asset)
          .size= human_asset_size(asset)

        .body
          .small-thumbnail
            - if asset_with_thumbnail?(asset) && thumbnail_url = asset.alternative_vignette_url
              = image_tag thumbnail_url
            - else
              div class="not-a-image #{asset.content_type}"
                span= asset_text(asset)

        .actions
          - if asset.source&.url
            = link_to asset.source.url, class: 'btn btn-primary btn-sm', target: '_blank' do
              i.fas.fa-download
            | &nbsp;

          - if enable_select
            = link_to t('.buttons.select'), asset.source.url, class: 'btn btn-primary btn-sm select', title: asset_filename(asset), data: { image: asset.image? }
            | &nbsp;

          - if asset.image?
            = link_to t('.buttons.edit'), edit_content_asset_path(current_site, asset._id), class: 'btn btn-primary btn-sm edit'

          | &nbsp;&nbsp;

          = link_to content_asset_path(current_site, asset, params.to_unsafe_h.slice(:types, :query, :page, :per_page)), class: 'remove', method: :delete, data: { confirm: t('locomotive.messages.confirm'), return_url: request.original_url }, title: t(:delete, scope: 'simple_form.buttons.defaults.locomotive'), remote: remote do
            i.far.fa-trash-alt

  .text-center
    = paginate @content_assets, theme: 'twitter-bootstrap-3', pagination_class: 'pagination-sm', remote: remote
